home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 4 / Amiga Tools 4.iso / tools / disk-tools / harddisk / noise-saver / developers.doc next >
Text File  |  1996-02-26  |  2KB  |  70 lines

  1. Ok,  this  is  just  a  rough doc about the onlineport of HDOff.  Sorry for
  2. this.  To use this, you should be used to MsgPorts and their handling!
  3.  
  4. The port`s name is : HDOFF_PORT
  5.  
  6. The port`s structure is:
  7.  
  8.     STRUCTURE       HD,MN_SIZE
  9.         UBYTE   HD_Cmd
  10.         WORD    HD_TimeHD0      ;Time in secs (startvalue)
  11.         WORD    HD_TimeHD1
  12.         WORD    HD_TimeLeftHD0  ;Time in secs (actual)
  13.         WORD    HD_TimeLeftHD1
  14.         UBYTE   HD_StatHD0      ;$ff: Drive off
  15.         UBYTE   HD_StatHD1
  16.         ULONG    HD_PortVer    ;Version of the port
  17.         LABEL   HD_SIZE
  18.  
  19. The actual portversion is: $100  (standing for 1.00)
  20.  
  21. Here are the commands:
  22.  
  23. hd_GetStats     equ     $00
  24. ~~~~~~~~~~~
  25. This gives you back the filled structure.
  26.  
  27. hd_SetStats     equ     $01
  28. ~~~~~~~~~~~
  29. You  can  set  HD_TimeHD0 and HD_TimeHD1 to new values, and you will get an
  30. answer like hd_GetStats.
  31.  
  32. hd_Subscribe    equ     $02
  33. ~~~~~~~~~~~~
  34. If  you  subscribe,  you  will  get  a  message  everytime a drive has been
  35. switched  on/off.   Check  the  answer!   If  HD_Cmd=0 your subscribing was
  36. unsuccessfull.
  37.  
  38. If  a drive changed its status, you`ll get a messy with HD_Cmd=hd_Subscribe
  39. filled with the new data`s.  You must not change/reply or do something else
  40. with this messy (except reading it out, of course ;) !
  41.  
  42. hd_Unsubscribe  equ     $03
  43. ~~~~~~~~~~~~~~
  44. You  won`t get a messys on a drive power down/up any more.  If HD_Cmd=0 you
  45. weren`t subscribed :)
  46.  
  47. hd_StopDrive    equ     $04
  48. ~~~~~~~~~~~~
  49. Here you can switch a drive off by setting HD_StatHDx=$ff.
  50.  
  51. hd_Quit         equ     $05
  52. ~~~~~~~
  53. This tries to terminate HDOff.  If the reply has HD_Cmd=hd_Die quitting was
  54. successfull, if not not :)
  55.  
  56. hd_ForceQuit    equ     $06
  57. ~~~~~~~~~~~~
  58. The same as hd_Quit, but using the force option (can`t fail), and you won`t
  59. get a reply.  NOTE:  read the warning about the FORCE-option in the doc!
  60.  
  61. hd_Die          equ     $FF
  62. ~~~~~~
  63. NOTE:  you can _only_ recive this!  If you get this Message, HDOff has been
  64. terminated and you must stop using the port any longer!
  65.  
  66. Ok, I hope every clarity has been removed ;-)
  67.  
  68. BTW,  does  anybody want to code a nice GUI for HDOff?  Like a commodity or
  69. something.  If you do, please contact me!!
  70.